#!/usr/bin/env ruby
#
# Geocodes the input address
# This should be run from the state directory
#
require File.join(File.dirname(__FILE__),'/geocode')

def main(argv)
  geo = Geocode.new
  geo.verbose = false
  arr = geo.geocode_args argv
  if arr
    longitude,latitude = arr
    puts "<?php\n"
    puts "define('LONGITUDE_START'," + longitude.to_s + ");\n"
    puts "define('LATITUDE_START'," + latitude.to_s + ");\n"
    puts "?>"
  else
    STDERR.puts 'none'
  end
end

main ARGV
